package com.meessiom.train.crm.student.repositroy;
import com.meessiom.train.crm.student.model.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository

public interface StudentRepository extends JpaRepository<Student,Long>,JpaSpecificationExecutor {

    @Query(value = "select student_name from students where id = ?", nativeQuery = true)
    public String getStudentNameById(long id);


     //public List<Student> findStudentByStudentNameLikeAndStudentAddressLikeAndStudentGenderLikeAndStudentAgeLikeAndStudentDepartmentLikeAndStudentMajorLikeAndStudentTeacherLikeAndStudentEmail
    // (@Param("name") String name, @Param("address") String address,
   //  @Param("age") String age, @Param("gender") String sex, @Param("department") String department,
   // @Param("teacher") String teacher, @Param("major") String major, @Param("email") String email);
}


